Configuring Response
The Response tab allows you to configure Rest response data into Platform object field by creating a response tree.
The response tree can be created in one of the following ways:
- Using the Invoke REST Service option that enables you to invoke the REST service with the header and the request you have mapped using an existing record in Platform.
- Using the Copy & Paste JSON option and passing a sample Response into a text area.
When you use the Invoke REST Service option, you must:
- Select record from the drop-down list and invoke a trigger or invoke REST service by either providing inline values for all your mappings that are done in the Header, Request, and URL builder tabs. The Select Record drop-down list will list top 10 records from your Platform objects.
- Once the response tree is built, you can add/update/delete more nodes by using toolbar buttons. This is useful if the schema is incomplete.
- Select a node under which you want to add a new node.
- Click the + icon to add a new node. Similarly, you can edit a
node and change its datatype by using the edit icon. You can also delete a node by
using delete icon.Note: At this stage, you can map a node from response object field to Platform object field (from right to left of the tree).
- Click OK to generate the code. You can then test and debug the trigger.
Note: Response data can be simple json object or have sub-objects returned in a json array.
See Supporting simple and complex cases in Response mapping to know how response fields will be mapped to Platform fields.